<section id="main" class="column main_shadow">
		<nav class="nav">
			<a href="?w=position/position_list" class="button blue">审核信息</a>
			<a href="?w=position/position_add" class="button blue">发布</a>
		</nav>
		<hr class="split"/>
		<article class="module width_full">
			<div class="module_content w500">
			<form action="/jobs/part-time/frontend/web/index.php?w=position/position_add" method="post">
			<input type="hidden" name="_csrf" value="<?= Yii::$app->request->csrfToken?>">
				<fieldset>
					<label for="txtName">职位名称</label>
					<input type="text" name="pos_name" id="txtName"/>
				</fieldset>
				<fieldset>
					<label for="txtButton">薪资</label>
					<input type="text" name="pos_salary" id="txtButton"/>
				</fieldset>
				<fieldset>
					<label for="txtModule">结算方式</label>
					<select name="settlement" id="">
						<option value="1">日结</option>
						<option value="2">周结</option>
						<option value="3">月结</option>
						<option value="4">面议</option>
					</select>
				</fieldset>
				<fieldset>
					<label for="txtAction">性别要求</label>
					<select name="pos_sex" id="">
						<option value="0">不限</option>
						<option value="1">女</option>
						<option value="2">男</option>
					</select>
				</fieldset>
				<fieldset>
					<label for="txtButton">分类</label>
					<select name="classify_id">
						<option value="">请选择...</option>
						<?php foreach ($classify as $k => $v) {?>
						<option value="<?= $v['id']?>" disabled>----<?= $v['classify_name']?></option>
						<?php foreach ($v['child'] as $key => $val) {?>
							<option value="<?= $val['id']?>"><?= $val['classify_name']?></option>
						<?php }?>
						<?php }?>
					</select>
				</fieldset>
				<span class="are_show">
				&nbsp;&nbsp;<label for="txtButton">地区</label><br>
				&nbsp;&nbsp;<select name="area_name[]" class="area">
								<option value="-1">选择</option>
								<?php foreach ($area as $k => $v) {?>
								<option value="<?= $v['id']?>"><?= $v['area_name']?></option>
								<?php }?>
						</select>
				</span>
				<fieldset>
					<label for="txtButton">面试地点</label>
					<input type="text" name="pos_interview" id="txtButton"/>
				</fieldset>
				<fieldset>
					<label for="txtButton">工作人数(0代表不限)</label>
					<input type="text" name="pos_num" id="txtButton"/>
				</fieldset>
				<fieldset>
					<label for="txtButton">职位介绍(要求)</label>
					<textarea name="pos_introduce" id="txtButton"  cols="30" rows="10"></textarea>
				</fieldset>
				<fieldset>
					<label for="txtButton">是否展示</label>
					<select name="pos_show" id="">
						<option value="1">展示</option>
					</select>
				</fieldset>
				<div class="tc mt20">
					<input type="submit" value="保存">
				</div>
				</form>
			</div>
		</article>
</section>
<script type="text/javascript">
	$(function(){
		$(document).on('change','.area',function(){
			var id = $(this).val()
			$(this).nextAll().remove()
			var str = '<select name="area_name[]" class="area"><option value="-1">请选择..</option>';
			$.ajax({
				url:'?w=position/position_area',
				data:{id:id},
				dataType:'json',
				success:function(data)
				{
					if(data.error==1)
					{
						var con = data.area;
						$.each(con,function(k,v){
							str+='<option value="'+v.id+'">'+v.area_name+'</option>'
						})
						str+='</select>';
						$('.are_show').append(str)

					}
				}
			})
		});
	})
</script>